-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(request-node): Add Request Node version and Request Client version to requests header #192
Conversation
it('the response header contains the Request Node version', async () => { | ||
// Import directly requestNode to create a server | ||
requestNodeInstance = new requestNode(); | ||
server = requestNodeInstance.listen(3002, () => 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't have to use listen
in unit tests, aren't we using supertest
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping :)
@@ -4,6 +4,9 @@ import axios, { AxiosRequestConfig } from 'axios'; | |||
|
|||
import { EventEmitter } from 'events'; | |||
|
|||
const packageJson = require('../package.json'); | |||
const REQUEST_CLIENT_VERSION_HEADER = 'X-Request-Client-Version'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
X-Request-Client-Version
is this name not too generic?
maybe X-Request-Network-Client-Version
to avoid collisions.
It's a genuine question maybe the name is already specific enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good remark
Description of the changes
Added the Request Node version in the response's header of each request to the Request Node.
Link to Jira
https://requestnetwork.atlassian.net/browse/PROT-1150